﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// BienLaiTraChiTiet Repository. Good example of CRUD operations.
    ///// </summary>
    public class BienLaiTraChiTietRepository : IBienLaiTraChiTietRepository
    {
        private static readonly IBienLaiTraChiTietDao _bienLaiTraChiTiet = DataAccess.BienLaiTraChiTietDao;
        public List<BienLaiTraChiTiet> GetList()
        {
          return  _bienLaiTraChiTiet.GetBienLaiTraChiTiet().ToList();
        }

        public BienLaiTraChiTiet Get(string id)
        {
           return _bienLaiTraChiTiet.GetBienLaiTraChiTietByID(id);
        }

        public void Insert(BienLaiTraChiTiet t)
        {
            _bienLaiTraChiTiet.InsertBienLaiTraChiTiet(t);
        }

        public void Update(BienLaiTraChiTiet t)
        {
            _bienLaiTraChiTiet.UpdateBienLaiTraChiTiet(t);
        }

        public void Delete(BienLaiTraChiTiet t)
        {
            _bienLaiTraChiTiet.DeleteBienLaiTraChiTiet(t);
        }

        public   List<BienLaiTraChiTiet> GetBienLaiTraChiTietByBienLaiTraID(string BienLaiTraID)
        {
            return _bienLaiTraChiTiet.GetBienLaiTraChiTietByBienLaiTraID(BienLaiTraID);
        }
    }
}